<template>
    <p>这是一个父组件</p>
    <p>{{ msg }}</p>
    <ChildCom :title="msg" @changeParent="receiveValue"/> 
</template>
<script>
import ChildCom from './ChildCom.vue';
export default{
        components:{
            ChildCom
        },
        data(){
            return{ 
                msg:"父组件的数据"
            }
        },
        methods:{
            receiveValue(value){
                console.log('value',value);
                this.msg = value
            }
        }
}
</script>